
const state = () => ({
    //医院等级
    hospitalLevelList: [{id: 1, level: '一甲医院'}, {id: 2, level: '二甲医院'}, {id: 3, level: '三甲医院'},
        {id: 4, level: '一乙医院'}, {id: 5, level: '二乙医院'}, {id: 6, level: '三乙医院'},],
})
const getters = {
    hospitalLevelList(state) {
        return [...state.hospitalLevelList];//hospitalLevelList是数组，是引用类型，所以要深拷贝一份
    }
}
const actions = {
    getHospitalLevelList({commit}) {
        commit('getHospitalLevelList')
    }
}
const mutations = {
    getHospitalLevelList(state,data) {
        console.log('医院列表');
    }
}
export default {
    state,
    getters,
    actions,
    mutations
}
